package cn.tedu.springbootdemo.bean;


import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
public class Worker {
    String name = "光头强";
    @Autowired
    Tool tool;
    public void work(){
        System.out.println(name+"使用"+tool+"砍树");
    }
}
